package com.kyivmohyla.kma2.client.events;

import com.google.gwt.event.shared.GwtEvent;
import com.kyivmohyla.kma2.shared.model.UIStaff;

public class LoginAllowEvent extends GwtEvent<LoginAllowEventHandler> {
    public static Type<LoginAllowEventHandler> TYPE = new Type<LoginAllowEventHandler>();
    private final UIStaff loginStaff;

    public LoginAllowEvent(UIStaff loginStaff) {
        this.loginStaff = loginStaff;
    }

    public UIStaff getLoginStaff() {
        return loginStaff;
    }

    public Type<LoginAllowEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(LoginAllowEventHandler handler) {
        handler.onLoginAllow(this);
    }
}
